package com.xyzq.cgate.common.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author chenchen
 * @since 2019-06-25
 */
public class Sign extends Model<Sign> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.INPUT)
    private String id;
    /**
     * 插件键
     */
    @TableField("app_key")
    private String appKey;
    /**
     * 检验密钥
     */
    @TableField("app_secret")
    private String appSecret;
    /**
     * 是否开启（0，未开启，1开启）
     */
    private Integer enabled;

    @TableField(exist = false)
    private boolean enabledContent;

    public boolean isEnabledContent() {
        return enabledContent;
    }

    public void setEnabledContent(boolean enabledContent) {
        this.enabledContent = enabledContent;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Sign{" +
        ", id=" + id +
        ", appKey=" + appKey +
        ", appSecret=" + appSecret +
        ", enabled=" + enabled +
        "}";
    }
}
